package com.yjck.fm.util;

public class SQLUtil {
	/**
	 * 获得总条数
	 * @param sql
	 * @return
	 */
	public static String getCountSQL(String sql){
		String SQL1 = "select count("+sql.split(",")[0].split(" ")[1]+") from ";
		String SQL2 = sql.split("from")[1].split("limit")[0];
		return SQL1+SQL2;
	}

}
